mathematics of investment